import pandas as pd

train_path =  './icr-identify-age-related-conditions/train.csv'
test_path  = './icr-identify-age-related-conditions/test.csv'
greeks_path = './icr-identify-age-related-conditions/greeks.csv'


train = pd.read_csv(train_path, index_col="Id").rename(columns=str.strip)
test = pd.read_csv(test_path, index_col="Id").rename(columns=str.strip)
greeks = pd.read_csv(greeks_path, index_col="Id").rename(columns=str.strip)



missing_values_cols = train.isna().sum()[train.isna().sum() > 0].index.to_list()

print("Training Dataset Missing Values\n")

for feature in missing_values_cols:
    print(
        (feature) + "\t",
        (str(train[feature].isna().sum())) + "\t",
        (f"{train[feature].isna().sum() / len(train):.1%}") + "\t",
        (f"{train[feature].dtype}"),
    )





numeric_descr = (
    train.drop("Class", axis=1)
    .describe(percentiles=[0.01, 0.05, 0.25, 0.50, 0.75, 0.95, 0.99])
    .drop("count")
    .T.rename(columns=str.title)
)

print(numeric_descr)








